package com.infolab.aims.domain.asset;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;

import com.infolab.aims.common.bean.AbstractModelBean;
import com.infolab.aims.domain.Location;

@Entity
@Table(name="AMTB_ASSET_COMPONENT")
public class AssetComponent extends AbstractModelBean implements Serializable {
	
	@EmbeddedId
	private AssetComponentPK assetComponentPK;
	
	private Integer quantity;
	
	@ManyToOne
	@JoinColumn(name="assetModelId",insertable=false,updatable=false)
	private AssetModel assetModel;
	
	@ManyToOne
	@JoinColumn(name="locationId",insertable=false,updatable=false)
	private Location location;
	
	@Column(insertable=false,updatable=false)
	private String companyCode;
	
	@Transient
	private boolean deleted;
	
	@Version 
	private int version;
	
	@Transient 
	private Float assetPrice;

	public AssetComponentPK getAssetComponentPK() {
		return assetComponentPK;
	}

	public void setAssetComponentPK(AssetComponentPK assetComponentPK) {
		this.assetComponentPK = assetComponentPK;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public AssetModel getAssetModel() {
		return assetModel;
	}

	public void setAssetModel(AssetModel assetModel) {
		this.assetModel = assetModel;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public String getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(String companyCode) {
		this.companyCode = companyCode;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Float getAssetPrice() {
		return assetPrice;
	}

	public void setAssetPrice(Float assetPrice) {
		this.assetPrice = assetPrice;
	}
	
	
}
